<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>日志查询</title>
		[#include "/html/include/easyuicss.html" /]
		[#include "/html/include/easyuijs.html" /]
		<style type="text/css">
			.datagrid-btable .datagrid-cell{
				padding:6px 4px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;
			}
		</style>
	</head>
	<body class="easyui-layout" data-options="fit:true" style="overflow-y: hidden">
	<table id="logs" class="easyui-datagrid"
		   data-options="
				url: '${app}/sysmgr/log/list.do',
				method: 'post',
				singleSelect: true,
				fitColumns: true,
				autoRowHeight: false,
				nowrap: true,
				toolbar: '#tb',
				pagination: true,
				pageSize: 20,
				pageList: [10,20,30]
			" style="width:100%;height:100%;">
		<thead>
		<tr>
			<th data-options="field:'seq_id',width:180,formatter:getText">流水号</th>
			<th data-options="field:'req_time',width:180,formatter:getText">操作时间</th>
			<th data-options="field:'user_name',width:100,formatter:getText">操作人</th>
			<th data-options="field:'client_ip',width:140,formatter:getText">操作IP</th>
			<th data-options="field:'req_url',width:200,formatter:getText">操作链接</th>
			<th data-options="field:'permit_name',width:140,formatter:getText">操作模块</th>
			<th data-options="field:'session_id',width:240,formatter:getText">sessionId</th>
			<th data-options="field:'user_agent',width:250,formatter:getText">userAgent</th>
		</tr>
		</thead>
	</table>
	<div id="tb">
		<span>用户名:</span>
		<input  class="easyui-textbox" id="userName" name="userName" />
		<span>操作时间:</span>
		<input  class="easyui-datebox" id="startTime" name="startTime" value="${startTime}" />
		<span>至</span>
		<input  class="easyui-datebox" id="endTime" name="endTime" value="${endTime}" />
		<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="searchLog();">查询</a>
	</div>
	</body>
    <script type="text/javascript">
		function searchLog(){
			$('#logs').datagrid('load', {
				userName: $('#userName').val(),
				startTime: $('#startTime').val(),
				endTime: $('#endTime').val()
			});
		}
        function getText(value, row, index) {
            return "<span title='"+value+"'>"+value+"</span>";
        }
	</script>
</html>